test: integration coverage for insurance, governance, monitoring and sanctions contracts - #1052
Merged
Conversation
…and sanctions Adds integration test modules to the propchain-tests suite (declared in tests/lib.rs) covering four contract crates that had zero integration coverage: - Insurance (MettaChain#1001): policy creation with bad-input rejections, claim authorization + payout lifecycle, oracle-event reporting with authorized-reporter enforcement and alert firing. - Governance (MettaChain#1002): signer setup -> create_proposal -> votes to threshold -> timelock elapse -> execute_proposal happy path, plus non-signer proposal/vote rejection, double-vote rejection and a majority-against proposal that must not execute. - Monitoring (MettaChain#1003): alert subscriber round-trip (subscribe is an idempotent no-op on duplicates, per source), reporter management and authorization, health-status override + alert-config round-trip, pause/resume gating, transfer_admin revoking the old admin. - Sanctions (MettaChain#1004): admin-gated entity/property administration, screening lifecycle that FAILs while a property is linked to a sanctioned entity and PASSes after clearing, jurisdiction-aware entity screening and removal semantics. Also adds propchain-sanctions as a test-crate dependency, drops the unused ink-as-dependency feature from the propchain-monitoring dep so the contract can be constructed in-process, and makes the insurance/governance/monitoring/sanctions contract modules `pub` so they can be imported cross-crate (ink! v5 requires a public module path). No business logic is changed. All 36 tests in `cargo test -p propchain-tests` pass, including 16 new ones. Closes MettaChain#1001 Closes MettaChain#1002 Closes MettaChain#1003 Closes MettaChain#1004
|
@authenticeasy-sys Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds integration test coverage in
tests/for four contract crates that previously had none: insurance (#1001), governance (#1002), monitoring (#1003) and sanctions (#1004). New modules are declared intests/lib.rs, matching the existingintegration_bridge_oracle.rspattern (#[ink::test]+ direct contract construction).What's covered
Supporting changes
tests/Cargo.toml: addpropchain-sanctions; drop unusedink-as-dependencyfrompropchain-monitoringso it can be constructed in-process.pubon theinsurance/governance/monitoring/sanctionscontract modules (ink! v5 requires a public module path for cross-crate imports).No business logic changed.
Testing
cargo test -p propchain-tests→ 36 passed (16 new)Closes #1001
Closes #1002
Closes #1003
Closes #1004